package org.itboys.mobile.dto.order;

import org.itboys.mobile.common.SundayCommonConstants;
import org.itboys.mobile.entity.mongo.OrderItem;
import org.itboys.mobile.entity.mongo.OrderItemAgent;

/**
 * Created on 2017/11/1.
 */
public class OrderItemDTO {
    private Long itemId;
    private Integer status;
    private String productName;
    private String productImg;
    private Integer num;
    private Double price;
    private String elements;
    private Integer type;
    private Double scale;
    private int isScore;
    private int score;
    private String scaleStr;


    public OrderItemDTO(OrderItemAgent item) {
        this.itemId = item.getId();
        this.status = item.getStatus();
        this.productName = item.getProductName();
        this.productImg = SundayCommonConstants.IMG_ROOT + item.getProductImg();
        this.num = item.getNum();
        this.price = item.getFee();
        this.elements = item.getElements();
    }

    public OrderItemDTO(OrderItem item) {
        this.itemId = item.getId();
        this.status = item.getStatus();
        this.productName = item.getProductName();
        this.productImg = SundayCommonConstants.IMG_ROOT + item.getProductImg();
        this.num = item.getNum();
        this.price = item.getFee();
        this.elements = item.getElements();
        this.type = item.getType();
        this.scale = item.getScale();
        this.isScore = item.getIsScore();
        this.score = item.getScore();
        this.scaleStr = item.getScale()+"x"+item.getNum();
    }


    public String getScaleStr() {
        return scaleStr;
    }

    public void setScaleStr(String scaleStr) {
        this.scaleStr = scaleStr;
    }

    public int getIsScore() {
        return isScore;
    }

    public void setIsScore(int isScore) {
        this.isScore = isScore;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Double getScale() {
        return scale;
    }

    public void setScale(Double scale) {
        this.scale = scale;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getElements() {
        return elements;
    }

    public void setElements(String elements) {
        this.elements = elements;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
